<?php

class IkebanaSaveAction extends SzAbstractAction
{
    protected $paramTypes = array(
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT
    );

    /**
     * 保存插花
     *
     * @param int $userId
     * @param string $vaseId
     * @param int $type
     * @param int $combinationId
     * @param int $index
     * @param int $reqTime
     * @return SzResponse
     */
    public function execute($userId, $vaseId, $type, $combinationId, $index, $reqTime)
    {
        GameService::get()->validateMultiRequestTimeDelta($userId, $reqTime);

        return $this->buildResponse(array(
            IkebanaService::get()->save($userId, $vaseId, $type, $combinationId, $index, $reqTime)
        ));
    }
}